package com.controller;

import com.entity.MenuEntity;
import com.service.MenuService;
import top.appx.espring.annotation.Action;
import top.appx.espring.annotation.Autowired;
import top.appx.espring.annotation.Controller;

import javax.servlet.http.HttpSession;


@Controller("/Menu")
public class MenuController extends BaseController<MenuEntity> {

    @Autowired
    private MenuService menuService;

    @Action("myMenuTree")
    public Object myMenuTree(HttpSession session){

        return menuService.myMenuTree();

      /*  List<ResultVO> list = new ArrayList<ResultVO>();


        list.add(ResultVO.data().p("id",1).p("text","系统管理").p("open",true).p("sequence",9).p("icon","/icon/wrench.png"));
       // list.add(ResultVO.data().p("id",2).p("text","部门人员管理").p("url","/page/system/departmentUserManager.jsp").p("pId",1));
     //   list.add(ResultVO.data().p("id",3).p("text","配置管理").p("url","/page/system/configManager.jsp").p("pId",1));
     //   list.add(ResultVO.data().p("id",4).p("text","角色管理").p("url","/page/system/roleManager.jsp").p("pId",1));
        list.add(ResultVO.data().p("id",6).p("text","配置管理").p("url","/page/system/ConfigManager.jsp").p("pId",1).p("iconCls","icon-bricks").p("icon","/icon/bricks.png"));

        list.add(ResultVO.data().p("id",5).p("text","漏洞扫描").p("open",true).p("sequence",1).p("icon","/icon/flag_red.png"));
        list.add(ResultVO.data().p("id",3).p("text","Ip管理").p("url","/page/ldsm/IpManager.html").p("pId",5).p("icon","/icon/flag_green.png").p("iconCls","icon-flaggreen"));
        list.add(ResultVO.data().p("id",7).p("text","扫描项管理").p("url","/page/ldsm/ScanPrjManager.html").p("pId",5).p("icon","/icon/flag_blue.png").p("iconCls","icon-flagblue"));
        list.add(ResultVO.data().p("id",8).p("text","扫描记录管理").p("url","/page/ldsm/ScanRecordManager.html").p("pId",5).p("icon","/icon/flag_orange.png").p("iconCls","icon-flagorange"));
      //  list.add(ResultVO.data().p("id",9).p("text","告警管理").p("url","/page/ldsm/WarningManager.html").p("pId",5));
        list.add(ResultVO.data().p("id",10).p("text","告警号码管理").p("url","/page/ldsm/AlarmMbnoManager.html").p("pId",5).p("icon","/icon/flag_yellow.png").p("iconCls","icon-flagyellow"));
        list.add(ResultVO.data().p("id",11).p("text","配置文件管理").p("url","/page/ldsm/ConfigFileManager.html").p("pId",5).p("icon","/icon/flag_green.png").p("iconCls","icon-flaggreen"));
        list.add(ResultVO.data().p("id",12).p("text","实时扫描").p("url","/page/ldsm/ConstantlyScanManager.html").p("pId",5).p("icon","/icon/flag_blue.png").p("iconCls","icon-flagblue"));
        return list;*/
    }
}
